package org.svnadmin.service;

import org.svnadmin.entity.Ajax;

import java.util.Map;

/**
 * ajax服务层接口
 *
 * @author <a href="mailto:yuanhuiwu@gmail.com">Huiwu Yuan</a>
 * @since 3.0.2
 */
public interface AjaxService {
    /**
     * html
     */
    String CONTENTTYPE_HTML = "text/html; charset=UTF-8";
    /**
     * xml
     */
    String CONTENTTYPE_XML = "text/xml; charset=UTF-8";
    /**
     * json
     */
    String CONTENTTYPE_JSON = "application/json; charset=UTF-8";
    /**
     * javascript
     */
    String CONTENTTYPE_JAVASCRIPT = "text/javascript; charset=UTF-8";
    /**
     * text
     */
    String CONTENTTYPE_TEXT = "text/plain; charset=UTF-8";

    /**
     * 执行逻辑
     *
     * @param parameters 参数
     * @return 结果
     */
    Ajax execute(Map<String, Object> parameters);
}
